﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core.LockStep;
using UnityEngine;

[StepDataID(1)]
public class StepData1MoveData : StepData<StepData1MoveData>
{
    public Vector3Int inputDelta;

    public override StepData1MoveData ReadFrom(IFrameDataStream stream)
    {
        inputDelta = stream.ReadV3I();
        return this;
    }

    public override void WriteTo(IFrameDataStream stream)
    {
        stream.WriteV3I(inputDelta);
    }

    public override void Clear()
    {
        inputDelta = Vector3Int.zero;
    }

    public override string GetDescription()
    {
        return $"<{GetType().Name}>PlayerId:{PlayerId}, moveDelta:({inputDelta.x},{inputDelta.y},{inputDelta.z})";
    }
}